/**
 * @file entry of this example.
 */
import React from 'react';
import ReactDom from 'react-dom';
import App from './App';
import "./scss/style.scss";

export function bootstrap(mountTo: HTMLElement) {
  ReactDom.render(<App />, mountTo);
}
function render(props) {
  const { container } = props;
  ReactDom.render(<App />, container ? container.querySelector('#root') : document.querySelector('#root'));
}
export async function newBootstrap() {
  console.log('[react16] react app bootstraped');
}

export async function mount(props) {
  console.log('[react16] props from main framework', props);
  render(props);
}

export async function unmount(props) {
  const { container } = props;
  ReactDom.unmountComponentAtNode(container ? container.querySelector('#root') : document.querySelector('#root'));
}
